package java44th.group.controller.wx.catalog;

import java44th.group.bean.admin.vo.BaseRespVo;
import java44th.group.bean.wx.vo.catalog.CurrentVo;
import java44th.group.bean.wx.vo.catalog.IndexVo;
import java44th.group.service.catalog.CatalogService;
import org.apache.catalina.security.SecurityUtil;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Aurhor: 徐云飞
 * @DATE: 2022/10/14 22:10
 * @Description:
 * @Version 1.0
 */
@RestController
@RequestMapping("wx/catalog")
public class CatalogController {

    @Autowired
    CatalogService catalogService;


    @GetMapping("current")
    public BaseRespVo current(Integer id) {

        CurrentVo currentVo = catalogService.current(id);

        return BaseRespVo.ok(currentVo);

    }

    @GetMapping("index")
    public BaseRespVo index() {

        IndexVo indexVo = catalogService.index();

        return BaseRespVo.ok(indexVo);

    }



}
